//
//  ChatVM.h
//  WanCaiC8
//
//  Created by tangang on 2018/4/10.
//  Copyright © 2018年 tangang. All rights reserved.
//

#import "BaseVM.h"
#import "ZXMessageModel.h"
#import "ChatRecordModel.h"
#import "RoomModel.h"
@interface ChatVM : BaseVM
/**
 * 上传图片
 * @param  image 图片
 * @param  success 成功返回
 * @param  fail 失败返回
 **/
- (void)postImageWithImage:(UIImage *)image andSuccess:(SuccessBlock)success andFail:(FailBlock)fail;
/**
 * 添加消息
 * @param  model 消息模型
 * @param  roomId 房间ID
 **/
- (void)addMessageWithModel:(ZXMessageModel *)model andRoomId:(NSString *)roomId;

/**
 * 删除消息
 * @param  model 消息模型
 * @param  success 成功返回
 * @param  fail 失败返回
 **/
- (void)deleteMessageWithModel:(ZXMessageModel *)model andRoomId:(NSString *)roomId andSuccess:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 加入黑名单
 * @param  model 消息模型
 * @param  success 成功返回
 * @param  fail 失败返回
 **/
- (void)blackPeopleWithModel:(ZXMessageModel *)model andRoomId:(NSString *)roomId andSuccess:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取历史记录
 * @param  roomId 房间号
 * @param  lastId 最后一条（可以为空）
 * @param  success 成功返回
 * @param  fail 失败返回
 **/
- (void)getHistoryWithRoomId:(NSString *)roomId andLastId:(NSString *)lastId andSuccess:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 删除所有
 * @param  model 消息模型
 * @param  success 成功返回
 * @param  fail 失败返回
 **/
- (void)deleteAllMessageWithModel:(ZXMessageModel *)model andRoomId:(NSString *)roomId andSuccess:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取处理记录
 * @param  lastId 最后一条记录
 * @param  success 成功返回
 * @param  fail 失败返回
 **/
- (void)getRecordWithId:(NSString *)lastId andRoomId:(NSString *)roomId andSuccess:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取拉黑列表
 * @param  lastId 最后一条记录
 * @param  success 成功返回
 * @param  fail 失败返回
 **/
- (void)getBlackListWithId:(NSInteger )lastId andRoomId:(NSString *)roomId andSuccess:(SuccessBlock)success andFail:(FailBlock)fail;


/**
 * 获取拉黑列表不分页
 * @param  success 成功返回
 * @param  fail 失败返回
 **/
- (void)getBlackListRoomId:(NSString *)roomId andSuccess:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 移除拉黑
 * @param  userId 用户id
 * @param  success 成功返回
 * @param  fail 失败返回
 **/
- (void)removeBlackWithId:(NSString *)userId andRoomId:(NSString *)roomId andUserName:(NSString *)userName andSuccess:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取房间列表
 * @param  success 成功返回
 * @param  fail 失败返回
 **/
- (void)getRoomListWithSuccess:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取当前房间状态
 * @param  success 成功返回
 * @param  fail 失败返回
 **/
- (void)getRoomStateWithSuccess:(SuccessBlock)success andFail:(FailBlock)fail;


+(ChatVM *)manage;

@end

@interface BlackPeopleModel:BaseModel
@property (nonatomic ,assign) NSInteger Id;
@property (nonatomic ,copy) NSString    *UserId;
@property (nonatomic ,copy) NSString    *UserName;
@property (nonatomic ,copy) NSString    *PhotoImg;
@property (nonatomic ,copy) NSString    *RoomId;
@end

